pp108 : UpdateXMLObject (CoBOC) (Deprecated)

UpdateXMLObject (CoBOC) (Deprecated)

 

This method is used to insert, update, and delete a CoBOC object. UpdateXMLObject is part of the CoBOC Methodset in the Cordys CoBOC application package.

Inserting a CoBOC Object

Use the following SOAP request to insert a CoBOC object.

Note: If you have configured the CoBOC service to use SQL Server, the business objects stored in the SQL Server database are not case sensitive. Therefore, observe caution while inserting objects of the same name but with a different case as it may result in an error. However, business objects stored in an Oracle database are case sensitive.

SOAP Request

<UpdateXMLObject xmlns="http://schemas.cordys.com/1.0/coboc">
    <tuple key="/Sales Process/Customer/o12" name="o12"
        template="/Sales Process/Customer" type="Instance" version="user">
        <new>
            <ENTITY>
                <EVENT_FLAG>0</EVENT_FLAG>
                <HISTORY>1</HISTORY>
                <OBJECT>
                    <Customer>
                        <CustomerName>Rose Mary</CustomerName>
                        <Balance>50000</Balance>
                    </Customer>
                </OBJECT>
                <DESCRIPTION>Test description</DESCRIPTION>
            </ENTITY>
        </new>
    </tuple>
</UpdateXMLObject>

Request Parameters

Parameter

Description

Data Type

Accepted Input Values

key

Contains the name of the object along with the full path

Path

The full path of the object -Example: /Sales Process Folder/012 You can also specify a path that is shared by preceding the folder path with the termshared.Example:shared/Sales Process Folder/012

template

Contains the path of the template

Path

The template will be searched in the order of the user, organization, and isv spaces respectively. Based on this search order, if the same template path exists in more than one space, the first occurrence of the template along the search order will be taken into consideration.

name

Contains the name of the object

String

If both the key and name are specified, the name of the object is derived from the key.If a name is not specified, the system automatically generates a name, which is the same as that of the object ID.

version

Contains the version of the folder where the object is inserted

String

The supported versions are

  • user
  • organization
  • isv
    If you do not provide the version, the system first searches in the user space, followed by the organization space, and then in the ISV space. The value set in the version attribute applies only to the key attribute of the request.

type

Defines the type of the object

String

  • To create an Object, set value to instance.
  • To create an template, set value to entity.
  • To create an folder, set value to entity.
  • To create an template-less object, set value to instance.

EVENT_FLAG

Allows you to trigger events

Boolean

1 or 0. Setting the flag to '1' causes events to be fired. Setting the flag to '0' disables events. The default value is

0. This element is not mandatory.

HISTORY

Monitors the object

Boolean

1 or 0. A value of1causes the history of the object to be persisted. This element is not mandatory.

OBJECT

Contains the elements of the object

XML

 

SOAP Response

<UpdateXMLObjectResponse xmlns="http://schemas.cordys.com/1.0/coboc">
    <tuple customkey="922693285" entity_id="10602578986926"
        entity_type="10601761973042" key="/Sales Process/Customer/o12"
        lastModified="1060257898692" level="user" name="o12"/>
</UpdateXMLObjectResponse>

Response Parameters

Parameter

Description

lastModified

Date and time of modification of the object, which should be used while updating the object

key

Name of the object along with the full path

name

Name of the XML object that is created

entity_id

ID of the XML object

entity_type

ID of the corresponding template

customkey

Custom key of the objectIf you have not defined a primary key, the custom key is set to the same value as that of the object ID.

level

Version (user, organization or isv) of the folder where the object is inserted

Updating a CoBOC Object

Use the following SOAP request to update an object.

SOAP Request

<UpdateXMLObject xmlns="http://schemas.cordys.com/1.0/coboc">
    <tuple key="/Sales Process/Customer/o12"
        lastModified="1060257898692" name="o12"
        template="/Sales Process/Customer" type="instance" version="organization">
        <old>
            <ENTITY>
                <ENTITY_ID>10602578986926</ENTITY_ID> OR <CUSTOMKEY>922693285</CUSTOMKEY> OR <CUSTOMKEY>
                    <key name="/Sales Processing/Customer.balance" value="40000"/>
                </CUSTOMKEY>
            </ENTITY>
        </old>
        <new>
            <ENTITY>
                <ENTITY_NAME>o12</ENTITY_NAME>
                <EVENT_FLAG>0</EVENT_FLAG>
                <HISTORY>1</HISTORY>
                <OBJECT>
                    <Customer>
                        <CustomerName>Rose Mary</CustomerName>
                        <Balance>40000</Balance>
                    </Customer>
                </OBJECT>
                <DESCRIPTION>Test description</DESCRIPTION>
            </ENTITY>
        </new>
    </tuple>
</UpdateXMLObject>

Request Parameters

Parameter

Description

Data Type

Accepted Input Values

lastModified

contains the last date and time of modification of the object

Date

 

key

Contains the name of the object along with the full path.

Path

Full path of the object -Example: /Sales Process Folder/012 You can also specify a path that is shared by preceding the folder path withshared.Example:shared/Sales Process Folder/012

template

Contains the path of the template.

Path

The template will be searched in the order of theuser,organization, and isv spaces respectively. Based on this search order, if the same template path exists in more than one space, the first occurrence of the template along the search order will be taken into consideration.

name

Contains the name of the object.

String

If both the key and name are specified, the name of the object is derived from the key.If a name is not specified, the system automatically generates a name, which is the same as that of the object ID.

version

Contains the version of the folder where the object is inserted

String

The supported versions are

  • user
  • organization
  • isv
    If you do not provide the version, the system first searches in the user space, followed by the organization space, and then in the ISV space. The value set in the version attribute applies only to the key attribute of the request.

type

Defines the type of the object

String

  • To create an Object, set value to instance.
  • To create an template, set value to entity.
  • To create an folder, set value to entity.
  • To create an template-less object, set value to instance.

ENTITY_ID

Unique Id of the object

Integer

 

CUSTOMKEY

Contains the custom key value of the object.

String

This can either be the custom key value or can be a name-value combination to uniquely identify the object. Thenameattribute in this element should be a special attribute.

ENTITY_NAME

New name of the object

String

 

EVENT_FLAG

allows you to trigger events

Boolean

1 or 0. Setting the flag to '1' causes events to be fired. Setting the flag to '0' disables events. The default value is

0. This element is not mandatory

HISTORY

Monitors the object

Boolean

1 or 0. A value of1causes the history of the object to be persisted. This element is not mandatory

OBJECT

Contains the elements of the object

XML

 

SOAP Response

<UpdateXMLObjectResponse xmlns='http://schemas.cordys.com/1.0/coboc'> 
    <tuple key='/f1/f2/o2' name='o12' lastModified='1048155566232' entity_id='1048155566232' customkey = 'key:value' level='organization'> 
</UpdateXMLObjectResponse>

Response Parameters

Parameter

Description

lastModified

Date and time of modification of the object, which should be used while updating the object

key

Name of the object along with the full path

name

Name of the object

entity_id

ID of the object

entity_type

ID of the corresponding template

customkey

Custom key of the objectIf you have not defined a primary key, the custom key is set to the same value as that of the object id.

level

Version (user or organization or isv) of the folder where the object is inserted

Deleting CoBOC Object

Use the following SOAP request to delete a CoBOC object.

<UpdateXMLObject xmlns="http://schemas.cordys.com/1.0/coboc">
    <tuple key="/SalesOrders/so1" lastModified="1060593418560"
        name="so1" template="/Sales Processing/so" type="Instance" version="organization">
        <old>
            <ENTITY>
                <ENTITY_ID>10605934185606</ENTITY_ID>
            </ENTITY>
        </old>
    </tuple>
</UpdateXMLObject>

Request Parameters

Parameter

Description

Data Type

Accepted Input Values

lastModified

contains the last date and time of modification of the object

Date

 

key

Contains the name of the object along with the full path.

String

Full path of the object -Example: /Sales Process Folder/012 You can also specify a path that is shared by preceding the folder path withshared.Example:shared/Sales Process Folder/012

template

Contains the path of the template.

String

The template will be searched in the order of the user, organization and ISV spaces respectively. Based on this search order, if the same template path exists in more than one space, the first occurrence of the template along the search order will be taken into consideration.

name

Contains the name of the object.

String

If both the key and name are specified, the name of the object is derived from the key.If a name is not specified, the system automatically generates a name, which is the same as that of the object ID.

version

Contains the version of the folder where the object is inserted

String

The supported versions are

  • user
  • organization
  • isv
    If you do not provide the version, the system first searches in the user space, followed by the organization space, and then in the ISV space. The value set in the version attribute applies only to the key attribute of the request.

type

Defines the type of the object

String

  • To create an Object, set value to instance.
  • To create an template, set value to entity.
  • To create an folder, set value to entity.
  • To create an template-less object, set value to instance.

ENTITY_ID

Unique Id of the object

Integer

 

CUSTOMKEY

Contains the custom key value of the object.

String

This can either be the custom key value or can be a name-value combination to uniquely identify the object. The name attribute in this element should be a special attribute.

SOAP Response

<UpdateXMLObjectResponse xmlns='http://schemas.cordys.com/1.0/coboc'> 
    <tuple key='/f1/f2/o2' name='o12' lastModified='1048155566232' entity_id='1048155566232' customkey = 'key:value' level='organization'> 
</UpdateXMLObjectResponse>

Response Parameters

Parameter

Description

lastModified

Date and time of modification of the object, which should be used while updating the object

key

Name of the object along with the full path

name

Name of the object

entity_id

ID of the object

entity_type

ID of the corresponding template

customkey

Custom key of the objectIf you have not defined a primary key, the custom key is set to the same value as that of the object id.

level

Version (user or organization or isv) of the folder where the object is inserted